﻿using System;

namespace Com.FoxGlobal.Daniel.Midea.TemplateService
{
    enum LoggingLevel
    {
        DEBUG = 1,
        INFO = 2,
        WARNING = 3,
        ERROR = 4
    }

    class Logging
    {

        public static void WriteException(Exception ex, string detail)
        {
            LogManager.WriteLog(string.Format("{0}\n{1}", detail, ex.ToString()));
        }

        public static void WriteException(Exception ex, string format, params object[] args)
        {
            LogManager.WriteLog(string.Format(format, args) + "\n" + ex.ToString());
        }

        public static void WriteLog(LoggingLevel level, string format, params object[] args)
        {
           LogManager.WriteLog(string.Format(format, args));           
        }
    }
}